<?php
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
$this->title="菜单列表";
$this->params['breadcrumbs'][]=">";
$this->params['breadcrumbs'][]=$this->title;
$this->registerCssFile('/web/admin/css/compiled/new-user.css');
?>
        
        <div class="container-fluid">
            <div id="pad-wrapper" class="users-list">
                <div class="row-fluid header">
                    <h3>菜单列表</h3>
                    <div class="span10 pull-right">
                        <a href="<?php echo yii\helpers\Url::to(['menu/add']) ?>" class="btn-flat success pull-right">
                            <span>&#43;</span>
                            添加新菜单
                        </a>
                    </div>
                </div>

                    <?php
                    if (Yii::$app->session->hasFlash('info')) {
                        echo '<span class="text-error">'.Yii::$app->session->getFlash('info').'</span>';
                    }
                    ?>
                <!-- Users table -->
                <div class="row-fluid table">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th class="span3 sortable">
                                    <span class="line"></span>ID
                                </th>
                                <th class="span3 sortable">
                                    <span class="line"></span>控制器模型
                                </th>
                                <th class="span3 sortable">
                                    <span class="line"></span>菜单连接
                                </th>
                                <th class="span3 sortable">
                                    <span class="line"></span>菜单名称
                                </th>
                                <th class="span3 sortable">
                                    <span class="line"></span>菜单logo
                                </th>
                                <th class="span3 sortable">
                                    <span class="line"></span>排序
                                </th>
                                <th class="span3 sortable align-right">
                                    <span class="line"></span>操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                        <!-- row -->
                        <?php foreach($menus as $menu): ?>
                        <tr class="first">
                            <td>
                                <?php echo $menu['cateid'] ?>
                            </td>
                            <td>
                                <?php echo $menu['module'] ; ?>
                            </td>
                            <td>
                                <?php echo $menu['url'] ?>
                            </td>
                            <td>
                                <?php echo $menu['label'] ; ?>
                            </td>
                            <td>
                                <?php echo $menu['icon'] ; ?>
                            </td>
                            <td>
                                <?php echo $menu['sort'] ; ?>
                            </td>
                            <td class="align-right">
                            <a href="<?php echo yii\helpers\Url::to(['menu/mod', 'cateid' => $menu['cateid']]); ?>">编辑</a>
                            <a href="<?php echo yii\helpers\Url::to(['menu/del', 'cateid' => $menu['cateid']]); ?>">删除</a>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
                <div class="pagination pull-right">
                    <?php /*echo yii\widgets\LinkPager::widget([
                        'pagination' => $pager,
                        'prevPageLabel' => '&#8249;',
                        'nextPageLabel' => '&#8250;',
                        ]);*/ ?>
                </div>
                <!-- end users table -->
            </div>
        </div>

    <!-- end main container -->
